<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML>
<html>
<head>
    <!-- 设置页面的 基本路径，页面所有资源引入和页面的跳转全部基于 base路径 -->
    <base href="<%=basePath%>">
    <%--引入easyui--%>
    <link rel="stylesheet" type="text/css" href="lib/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="lib/easyui/themes/icon.css">
    <script type="text/javascript" src="lib/easyui/jquery.min.js">
    </script>
    <script type="text/javascript" src="lib/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="lib/easyui/easyui-lang-zh_CN.js">
    </script>
    <title>login</title>
</head>
<body>
<form action="admin/login.do" method="post" id="adminForm">
    <div style="width: 500px;height: 200px;margin:150px auto">
        <div class="easyui-panel" title="ting域主持人登录" style="width: 500px;height: 260px;padding:10px;
        background-color:#eeeeee;text-align: center">
            <div style="padding: 15px 50px">
                <input required class="easyui-textbox" prompt="请输入用户名"
                       data-options="iconCls:'icon-man',iconAlign:'left',missingMessage:'用户名不能为空'"
                       style="width:100%;height:34px;padding:10px" name="aname">
            </div>
            <div style="padding: 15px 50px">
                <input required class="easyui-passwordbox" prompt="请输入密码" iconWidth="28"
                       style="width:100%;height:34px;padding:10px"
                       data-options="showEye:false,iconCls:'icon-lock',iconAlign:'left',missingMessage:'密码不能为空'"
                        name="apwd">
            </div>
            <div style="padding: 15px 50px;text-align: center">
                <a onclick="loginFun()" id="btn" href="javascript:void(0)" class="easyui-linkbutton" >登录</a>
            </div>

            <span style="color: red">${msg}</span>
        </div>
    </div>
</form>

<script type="text/javascript">
    function loginFun() {

       var flag= $("#adminForm").form("validate");

       if (flag){

           $("#adminForm").submit();
       }

    }

</script>
</body>
</html>
